#ifndef H_BUILDBUDDY_FILESYSTEM_MONITOR_H
#define H_BUILDBUDDY_FILESYSTEM_MONITOR_H

#include "view.h"

#include <stddef.h>

/**
 * Types
 **/
struct bb_filesystem_change
{
    // TODO
};

struct bb_filesystem_monitor
{
    int inotify_fd;
    void (*handler)(void*, struct bb_filesystem_change const*);
    void *handler_arg0;
    struct bb_view* view;
};

/**
 * Init/Unit
 **/
void bb_filesystem_monitor_init(
    struct bb_filesystem_monitor*, 
    void (*handler)(void*, struct bb_filesystem_change const*), void* handler_arg0,
    struct bb_view*);
void bb_filesystem_monitor_unit(struct bb_filesystem_monitor*);

/**
 * Control monitored files
 **/
void bb_filesystem_monitor_add_directory(struct bb_filesystem_monitor*, char const*);
//void bb_filesystem_monitor_add_filetype(bb_filesystem_monitor*, char const*);

/**
 * Run
 **/
void bb_filesystem_monitor_run(struct bb_filesystem_monitor*);

#endif

